home *** CD-ROM | disk | FTP | other *** search
- .f3 - # - Chapter 13 - Macros
- .rm70
- .tc
- .tc1
- .tc 13. MACROS ............................................#
- CHAPTER 13 MACROS
-
- .imMacros
- .ix Definition
- .irKeyboard;Keyboard Macros see Macros
- A macro is essentially a pre recorded sequence of key strokes that you
- wish to execute. Each macro may contain up to 255 characters, and is
- stored in a macro file. Each macro file has room for 36 macros. Several
- macro files are provided with the Word Fugue package. They all end
- with the extension .MAC The standard one WF.MAC will always be loaded
- on startup.
-
- The files provided are:-
- .ix Standard macro files
-
- WF.MAC standard macros for word processing
-
- SINGLE.MAC definitions for box drawing characters, concentrating on
- single lines.
-
- DOUBLE.MAC definitions for box drawing characters, concentrating on
- double lines.
-
- GREEK.MAC allows access to the Greek character set (as supported by
- the IBM PC)
-
- EUROPE.MAC allows access to the European characters supported by the
- IBM PC.
-
- PASCAL.MAC assorted macros for pascal programmers.
-
- Each macro has an identifying character that is used to activate it or
- replay it. These identifiers are the numbers 0 to 9, and the letters A
- to Z. Lowercase and uppercase letters are treated the same. You can
- only load one macro file at a time, but you can use macros to load
- other macro files and execute macros from there. In addition you can
- load a different macro file to execute a single command, and the
- return to your original macro file.
-
- You can have a set of macro files in each directory you use if
- necessary, since Word Fugue looks in the current directory when
- loading a macro file. When first started, Word Fugue will look for the
- macro file WF.MAC in the default directory and if it does not find it
- there, will look in the defined home directory.
-
- .tc Recording A Macro ..................................#
- Recording A Macro
- .ix Recording
-
- Before you can use macros, you need to set them up. The simplest
- method is to record a sequence of key strokes. You achieve this by
- pressing Alt R at the start of the sequence, and Alt R again when you
- have finished. You will be prompted with a list of macros in the macro
- file, and you will be asked to choose one to use as the repository of
- the characters you have just recorded. Use the cursor movement keys to
- highlight the macro you wish to store the keystrokes in, and press
- Return. You will then be prompted for a name for the macro, which is
- displayed whenever a list of available macros is displayed. Enter
- something meaningful, and if possible, prefix it with the letter that
- will be used to activate it.
-
- .CP6
- You need to be sure that the sequence of keystrokes you enter is
- correct, since they will be replayed exactly as you entered them.
- However, if necessary, you can edit the stored macro command to
- correct it.
-
- .tc Editing A Macro ....................................#
- Editing A Macro
- .ix Editing
-
- Macros recorded within Word Fugue can be edited on a character by
- character basis using the built-in macro editor. Enter the command Alt
- E to edit a macro from the current set of loaded macros. A list of the
- current macros will be displayed, and you select the one you want by
- use of the cursor keys to highlight the appropriate one, and pressing
- Return to select it. See Fig 13.3 for the macro selection window.
-
- First, a prompt box will ask for a new name for the macro, which you
- can accept as is, or change. You should always include the activation
- letter in the name, for ease when replaying. The macros numbered 1 to
- 9 are activated by the numbers 1 to 9, while those numbered 10 to 35
- are activated by pressing the letters A to Z in that order.
-
-
- …ÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕ Macro Name ÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕª
- ∫1 - delete word left ∫
- »ÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕº
-
- Fig 13.1 - Edit Macro Name
- .tc1 Fig 13.1 - Edit Macro Name ............................#
-
-
- The macro will appear in another window. Most characters you type will
- be inserted literally into the macro, with the following exceptions.
-
- It can be edited using the cursor arrow keys, and the <Del> or
- <Backspace> keys. <CtrlBksp> will delete the macro. <Enter> will end
- the session in the macro editor. <Esc> will undo any changes made to
- the macro. Pressing Alt plus the number keys on the numeric keypad to
- code the decimal sequence of a character will enter that character.
- This makes it easy to enter those high order characters that do not
- appear on the keyboard. Consult your DOS manual for more information
- on entering alternate key strokes on your computer.
-
- In case you need to enter any of these special keys as part of the
- macro, press the <ScrollLock> key to enter Literal mode. In this mode,
- all keystrokes will be inserted into the macro without any
- interpretation. In order to terminate the edit when in this mode, you
- will need to press <ScrollLock> again in order to enter the <Enter> or
- <ESC> characters.
-
- .CP14
-
- …ÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕ delete word left ÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕª
- ∫ <CtrlLft><CtrlT> ∫
- ∫ ∫
- ∫ ∫
- ∫ ∫
- ∫ ∫
- ∫ ∫
- ∫ ∫
- ∫ ∫
- ∫ ∫
- »ÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕ Command ÕÕÕº
-
- Fig 13.2 - Edit Macro Window
- .tc1 Fig 13.2 - Edit Macro Window ..........................#
-
- The bottom right hand corner of the Edit Macro Window displays either
- Command or Literal to indicate in which mode the window is currently.
-
- As you can see from Fig 13.2, the keystrokes are all given names when
- typed into the macro.
-
- .tc Saving A Macro File ................................#
- Saving A Macro File
- .ix Saving macro file
-
- If the macro you have recorded are to be of any use in later sessions
- of Word Fugue, you will need to save the file containing them. The
- command sequence Alt W will save the macro file. You will be prompted
- to enter a file name, with the current file name being displayed. You
- can either edit it, or press Return to accept it.
-
- If the filename already exists, you will be prompted with Overwrite
- File? (Y/N) . If you enter Y the file will be overwritten. If you
- press N or ESC, the file will not be overwritten. In this situation
- you will need to enter the command again and type in a different file
- name.
-
- .tc Playing Back A Macro ...............................#
- Playing Back A Macro
- .ix Playing back
-
- Having set up a macro, you can now play it back. There are several
- commands available to do this.
-
- .tc Activate Macro 1 to 9 ...........................#
- Activate Macro 1 to 9
-
- These macros can be activated by pressing Alt 1 to Alt 9 using the
- numbers on the main keyboard above the letters. (Not the numeric key
- pad - they will not work!!). You should place your most often used
- macros in slots 1 to 9, since they are the easiest to activate.
-
- .tc Activate Macro ..................................#
- Activate Macro
- .ix Activation
-
- This command waits for the next keystroke, and if it is a macro
- identifier, activates that macro. Press Alt M or ESC (Wordstar
- compatible command). The top line will display choose macro to
- apply if you pause before entering the macro identifier. If you
- enter 0 to 9 or A to Z (upper or lower case), the appropriate macro
- will be activated. Press any other key to abort playback.
-
- .CP6
- This command assumes that you know which macros you have available,
- and will not display any list. The macro will be replayed once. It
- is intended as a shortcut for those who are familiar with their
- macros.
-
- If you are not familiar with the list of macros, you would be better
- to activate the macro by selecting it from a list.
-
- .tc Choose Macro From List ..........................#
- Choose Macro From List
- .ix Playing back
- .ix Activation
-
- This command displays a list of available macros for you to choose
- from. Press Alt 0 to activate this command. You select the macro you
- want by use of the cursor control keys to highlight the one you
- want, and press Return to select it. If you do not have EGA or VGA
- style monitor, the list will be longer than can fit on the screen.
- Arrows will show at the bottom of the window to indicate whether
- there are more entries above or below. These arrows can also act as
- scroll points for a mouse. Put the mouse cursor over the arrow and
- press the left button. The highlight will move in the direction of
- the arrow until you release the button.
-
- Mouse users should also be aware that left button dragging the mouse
- will move the highlight, and releasing the button will activate the
- highlighted macro. If you find that you have started dragging by
- mistake, drag the cursor to the bottom line (the one with the
- arrows), but keep the mouse cursor away from the arrows when you
- release the button. The bottom line acts as a safety zone for mice.
-
- .CP25
-
- …ÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕ Macros ÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕª
- ∫ 0 spare ∫
- ∫ 1 delete word left ∫
- ∫ 2 ^P^K - index marker ∫
- ∫ 3 Set Wide Characters ∫
- ∫ 4 Capitalise this letter, go to next word ∫
- ∫ 5 Spell check this word ∫
- ∫ 6 spare ∫
- ∫ 7 Print block ∫
- ∫ 8 spare ∫
- ∫ 9 Toggle Case ∫
- ∫ 10 A - paste Calculation Result ∫
- ∫ 11 B - ˛ bullet ∫
- ∫ 12 C - .CP cmd ∫
- ∫ 13 D - Date dd month yyyy ∫
- ∫ 14 Even blank page ∫
- ∫ 15 F - Create label file ∫
- ∫ 16 G - Copy label block to Label file ∫
- ∫ 17 H - Print label file on 1´" labels ∫
- ∫ 18 I - Clear label file ∫
- ∫ 19 Spare J ∫
- »ÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕv≥ ÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕº
-
-
-
- Fig 13.3 - Macro Selection Window
- .tc1 Fig 13.3 - Macro Selection Window .....................#
-
-
- .CP6
- The menu will disappear, and the macro will be replayed once. If you
- change your mind, press ESC to abort the command.
-
- .tc Replay Macro Many Times .........................#
- Replay Macro Many Times
-
- Press Alt - (the ALT key plus the minus/hyphen key above the
- letters; the minus key on the numeric keypad will not work) to
- activate this command. This command displays a list of available
- macros for you to choose from. You select the macro you want by use
- of the cursor control keys to highlight the one you want, and press
- Return to select it.
-
- The menu will disappear, and you will be prompted for the number of
- times to replay the macro. If you change your mind, press ESC to
- abort the command. You will be told how many times the macro can fit
- in the replay buffer. Enter a number and press Return. The macro
- will replay the number of times you entered. This is especially
- useful with the line drawing macros.
-
-
- …ÕÕÕ Insert Macro (Number of Times<= 200) ÕÕÕÕª
- ∫ ∫
- »ÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕº
-
- Fig 13.4 - Specify Number of Times to Replay Macro
- .tc1 Fig 13.4 - Specify Number of Times to Replay Macro ....#
-
-
- .tc Find And Apply Macro ............................#
- Find And Apply Macro
- .ix Search and apply macro
- .ixSearch & Replace; Search and apply macro
-
- This function allows you to apply a macro to text that the Find /
- Replace command highlights. Press Ctrl Q M and a pop up search
- window will display. Enter the text to be searched for. You will
- then be prompted for the macro to replay. A list of available macros
- for you to choose from will be displayed. You select the macro you
- want by use of the cursor control keys to highlight the one you
- want, and press Return to select it.
-
- You then enter the search / replace options. Refer to the chapter on
- Find/Replace for more information on these.
-
- The cursor will be positioned at the end of the found text, and you
- will be prompted whether to apply the macro or not (unless you
- specified the N option for Do Not Ask). If you select Y then the
- macro you selected will be applied to the text.
-
- .CP15
- .tc Example Macros ..................................#
- Example Macros
-
- 1 Delete Word Left: <CtrlLft><CtrlT>
-
- 4 Spell check this word: <CtrlK><CtrlT><AltS>
-
- D Date dd month yyyy: <CtrlJ><CtrlI>@@D8<Enter>
-
- H HRHighness: Her Royal Highness Queen Elizabeth II
-
- X Datestamp file at EOF: <CtrlK>0
- <CtrlPgDn>..Changed <CtrlJ>
- <CtrlI>@D6<Enter>
- <CtrlJ><CtrlI>@T0<Enter>
- <Enter>
- <CtrlQ>0<CtrlK>0
-
- The lines of this macro act as follows:
- Set marker 0
- Go to bottom of file and insert
- text "..Changed "
- Insert date in format dd MMM yyyy
- Insert time in format hh:mm (military)
- Terminate line with CR
- Return to marker 0
- Switch off marker 0
-
- .tc Loading A Macro File ...............................#
- Loading A Macro File
- .ix Loading macro file
-
- There are 2 methods of loading a Macro file, the first to load a file
- for usage, and the second to load a file to replay only one macro and
- then to re-load the original macro file. This second command is very
- useful for extending the number of macros available by placing less
- frequently used ones on a separate file.
-
- .tc Load A Macro File ...............................#
- Load A Macro File
-
- Pressing the command Alt L will prompt you for a file name to load
- as a macro file. The default extension for a macro file is .MAC. You
- may use wild cards to search the directory. If you press ESC you can
- abort the load process, and the currently loaded file remains
- loaded.
-
- Otherwise the new macro file will be loaded for use. You can have
- different macro files for different tasks, such as the line drawing
- macro files supplied with Word Fugue and the Pascal macros also
- supplied.
-
- Once a macro file is loaded using this command, it remains loaded
- until you load another file.
-
- .CP16
- .tc Temporarily Load A New Macro File ...............#
- .ix Loading macro file
- Temporarily Load A New Macro File
-
- This command loads a new macro file to enable you to execute one
- command from the file. The old macro file is then reloaded. Press
- Ctrl J I M and you will be prompted for the name of the macro file
- to load. You will then be presented with the list of available
- macros for you to select one to replay. You select the macro you
- want by use of the cursor control keys to highlight the one you
- want, and press Return to select it.
-
- The macro will be replayed once, and then the original macro file
- will be reloaded. If you change your mind, you can press ESC at any
- stage, and the process will abort and the original macro file will
- reload.
-
- The macro file WF.MAC contains 3 macros that load another macro file
- and replay a single macro from it - they are macros K and L for
- single and double line drawing characters, and macro R for selection
- of ruler lines.
-